#pragma once
#include "GLSLShader.h"
#include "AbstractCamera.h"

namespace Render{
	class RenderableObject
	{
	public:
		RenderableObject(void);
		virtual ~RenderableObject(void);
		virtual void Render(const float* MVP,const glm::vec3 &cameraPosition = glm::vec3(1));
	
		virtual int GetTotalVertices()=0;
		virtual int GetTotalIndices()=0;
		virtual GLenum GetPrimitiveType() =0;

		virtual void FillVertexBuffer(GLfloat* pBuffer)=0;
		virtual void FillIndexBuffer(GLuint* pBuffer)=0;
	
		virtual void SetCustomUniforms(){}

		void Init();
		void Destroy();

	protected:
		GLuint vaoID;
		GLuint vboVerticesID;
		GLuint vboIndicesID;
	
		GLSLShader shader;

		GLenum primType;
		int totalVertices, totalIndices;
	};
}
